import request from '@/utils/request'

// 获取结构信息
export const getDepartment = () => request({
  url: '/company/department'
})

// 获取负责人信息
export const getManagerList = () => request({
  url: '/sys/user/simple'
})

// 添加子部门
export const addDepartment = data => request({
  method: 'POST',
  url: '/company/department',
  data
})

// 获取部门详细信息
export const getDepartmentDetail = id => request({
  url: `/company/department/${id}`
})

// 修改部门信息
export const updateDepartment = data => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

// 删除部门信息
export const delDepartment = id => request({
  method: 'delete',
  url: `/company/department/${id}`
})
